<template>
	<!-- 设置时长 -->
	<view class="page-content">
		<!-- 1-已配对 2-未配对  -->
		<view class="page-top">
			<view class="page-top-l">
				<view class="t-tit">{{i18n.setTime.dangqianpedui}}：Suelinan
					<text class="t-model"
						:style="{background:modelType==='1'?'#D70000':'#00CD8B'}">{{modelType==='1'?i18n.setTime.jihuoban:i18n.setTime.tongyongban}}</text>
				</view>
			</view>
			<view class="page-top-r" v-if="modelType==='2'">
				<!-- 1-激活版  2-通用版 -->
				{{i18n.setTime.shijianzhanghu}}：60{{i18n.setTime.time}}<text class="icons icon-gengduo"></text>
			</view>
		
		</view>
		<view class="page-body">
			<view v-if="datalist && datalist.length > 0 ">
				<radio-group class="lang" @change="radioChange">
				    <label v-for="(item, index) in datalist" :key="index" class="list-li">
				        <view class="list-li-l">
				            <text class="list-li-l-tit">{{ item.name }}{{i18n.setTime.time}}</text>
				        </view>
				        <radio color="#D70000" style="transform:scale(0.7)" :value="item.name" :checked="item.checked"></radio>
				    </label>
				</radio-group>
				<view class="box-button" @click="tohome">{{i18n.setTime.xiayibu}}</view>
			</view>
			<!--无数据-->
			<empty v-else no-full type="noData"></empty>
		</view>
	</view>
</template>

<script>
	import {
		getgamegroups //获取赛事组别
	} from '@/common/api.js'
	import { mapGetters, mapActions } from "vuex";
	export default {
		components: {},
		data() {
			return {
				tp_id:'',
				datalist: [
					{
						name:'10',
						checked: true,
					},{
						name:'20',
						checked: false,
					},{
						name:'30',
						checked: false,
					},{
						name:'40',
						checked: false,
					},{
						name:'50',
						checked: false,
					},{
						name:'60',
						checked: false,
					}
				]
			}
		},
		computed: {
		  ...mapGetters([
		    "modelType", "pairStatu"
		  ]),
		  i18n() {
		  	return this.$t('message');
		  }
		},
		onShow(){
			// 导航栏多语言
			uni.setNavigationBarTitle({
				title: this.i18n.tabBar.setTime
			});
			this.getdata();
		},
		onLoad(option) {
			console.log(222, option)
			this.tp_id = option.id;
		},
		methods: {
			...mapActions("user", ["setModelType","setPairStatu"]),
			radioChange(e){
				console.log(333,e.detail)
			},
			getdata(){
				
			},
			tohome(type){
				console.log(333);
				// 登录成功后跳转的地址
				uni.switchTab({
					url: '/pages/home/home',
				});
				/* uni.navigateBack({
					delta: 3
				}); */
			}
		}
	}
</script>

<style lang="scss">
	.page-content {
		width: 100vw;
		background: $uni-bg-color;
		color: $font-color-w;
		padding: $page-row-spacing;
	}
	//头部
	.page-top {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 30rpx;
	
		.t-logo {
			width: 239rpx;
			height: 40rpx;
		}
	
		.page-top-l {
			display: flex;
	
			.t-tit {
				font-size: $font-base;
			}
	
			.t-model {
				height: 40rpx;
				border-radius: 20rpx;
				padding: 0 16rpx;
				font-size: 20rpx;
				font-weight: 400;
				line-height: 40rpx;
				margin-left: 16rpx;
			}
		}
	
		.page-top-r {
			font-size: 28rpx;
			font-weight: 400;
			color: #DDDDDD;
		}
	
	
	}

	.page-body {
		height: 100%;
		display: flex;
		flex-direction: column;
		.box-button{
			height: 98rpx;
			background: #D70000;
			box-shadow: 0px 2rpx 9rpx rgba(0, 0, 0, 0.44);
			border-radius: 49rpx;
			font-size: 42rpx;
			text-align: center;
			font-weight: 400;
			line-height: 98rpx;
		}

		.list-li {
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: $page-row-spacing;
			background: $uni-bg-box-color;
			box-shadow: 0rpx 2rpx 9rpx 0rpx rgba(0, 0, 0, 0.44);
			border-radius: 20rpx;
			margin-bottom: 40rpx;
			color: #fff;

			.list-li-l {
				display: flex;
				font-size: 28rpx;

				.list-li-l-tit {
					margin-right: 20rpx;
				}

				.list-li-l-mon {
					height: 40rpx;
					border-radius: 20rpx;
					padding: 0 16rpx;
					font-size: 20rpx;
					font-weight: 400;
					line-height: 40rpx;
					margin-left: 16rpx;
				}
			}
		}
	}
</style>
